//
//  CAEditAddressApi.m
//  LNH
//
//  Created by twentylx on 2018/2/7.
//  Copyright © 2018年 twentylx. All rights reserved.
//

#import "CAEditAddressApi.h"

@implementation CAEditAddressApi {
    NSString *_name;
    NSString *_phone;
    NSString *_pId;
    NSString *_cId;
    NSString *_aId;
    NSString *_address;
    NSString *_isDefault;
    NSString *_addressId;
}

- (instancetype) initWithName:(NSString *) name Phone:(NSString *) phone PId:(NSString *) pId CId:(NSString *) cId AId:(NSString *) aId Address:(NSString *) address IsDefault:(NSString *) isDefault AddressId:(NSString *)addressId {
    self = [super init];
    if (self) {
        _name = name;
        _phone = phone;
        _pId = pId;
        _cId = cId;
        _aId = aId;
        _address = address;
        _isDefault = isDefault;
        _addressId = addressId;
    }
    return self;
}

-(YTKRequestMethod)requestMethod{
    return YTKRequestMethodPOST;
}

-(id)requestArgument{
    return @{
             @"token":GVUD.token,
             @"name":_name,
             @"phone_number":_phone,
             @"province_id":_pId,
             @"city_id":_cId,
             @"area_id":_aId,
             @"address":_address,
             @"is_default":_isDefault,
             @"id":_addressId,
             };
}

-(NSString *)requestUrl{
    NSLog(@"%@", [NSString stringWithFormat:@"%@userAddress/update",BASE_SERVICE_DOMAIN]);
    return [NSString stringWithFormat:@"%@userAddress/update",BASE_SERVICE_DOMAIN];
    
    
}


@end
